package com.baizhi.service.impl;

import com.baizhi.dao.OrderItemDao;
import com.baizhi.entity.OrderItem;
import com.baizhi.service.OrderItemService;
import com.baizhi.util.MyBatisUtil;

public class OrderItemServiceImpl implements OrderItemService{
	private OrderItemDao od = null;

	@Override
	public int insertOrderItem(OrderItem oi) {
		od = MyBatisUtil.getMapper(OrderItemDao.class);
		int i = od.insertOrderItem(oi);
		if(i>0){
			MyBatisUtil.commit();
		}else{
			MyBatisUtil.rollback();
		}
		return i;
	}

}
